Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1782778: Fix Function available memory exhausted #2747

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sfc-gh-yuwang
Copy link
Collaborator

@sfc-gh-yuwang sfc-gh-yuwang commented Dec 11, 2024

  1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-1782778

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
    • I acknowledge that I have ensured my changes to be thread-safe. Follow the link for more information: Thread-safe Developer Guidelines
  3. Please describe how your code solves the related issue.

    We hit this issue because when it is not a select statement, we do not have a limit on the query results, while regex is always not reliable enough to decide whether it is a select statement. Thus leading to accidental consume of huge queries.
    This PR is meant to add a limit even if it is not select statement, we did this by consume it with iterator and return limited rows, which avoid this issue

@sfc-gh-yuwang sfc-gh-yuwang marked this pull request as ready for review December 11, 2024 23:22
@sfc-gh-yuwang sfc-gh-yuwang requested review from a team as code owners December 11, 2024 23:22
Copy link

Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing

Copy link
Contributor

@sfc-gh-aalam sfc-gh-aalam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can also make the update in MockServerConnection to maintain consistency.

src/snowflake/snowpark/_internal/server_connection.py Outdated Show resolved Hide resolved
src/snowflake/snowpark/_internal/server_connection.py Outdated Show resolved Hide resolved
Copy link

Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing

@sfc-gh-aalam
Copy link
Contributor

don't forget to update PR description

@github-actions github-actions bot added the local testing Local Testing issues/PRs label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO-NOT-MERGE local testing Local Testing issues/PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants